import request from "@/utils/request";
//耗材列表
export function materialBaseList(data) {
  return request({
    method: "post",
    url: "/waste/materialBase/getList",
    data
  });
}
//耗材新增
export function materialBaseSave(data) {
  return request({
    method: "post",
    url: "/waste/materialBase/save",
    data
  });
}
//出入库记录
export function getMaterialRecordList(id) {
  return request({
    method:'get',
    url:`/waste/materialBase/getMaterialRecordList/${id}`,
  })
}

//耗材删除
export function materialBaseRemove(id) {
  return request({
    method: "delete",
    url: `/waste/materialBase/remove/${id}`
  });
}

//确认删除
export function judgeRemove(id) {
  return request({
    method:'delete',
    url:`/waste/materialBase/judgeRemove/${id}`
  })
}

//导入设备列表 /deviceBase/importList
export function importList(data) {
  return request({
    method: "post",
    url: "/waste/materialBase/importList",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data
  });
}
///deviceBase/exportList 导出设备列表
export function exportList(data) {
  return request({
    method: "post",
    url: "/waste/materialBase/exportList",
    responseType: "blob",
    data
  });
}

//下载模板
export function downloadTemplate(data) {
  return request({
    method: "get",
    responseType: "blob",
    url: "/waste/materialBase/downloadTemplate"
  });
}